<template>
    <div>
        <div>作者:{{detailData.author}}</div>
        <div>标题:{{detailData.title}}</div>
        <div>点赞量:{{detailData.count}}</div>
        <div>内容:{{detailData.text}}</div>
    </div>
</template>
<script>
import {mapState, mapMutations} from 'vuex'

export default {
    computed:{
        ...mapState(['detailData'])
    },
    methods:{
        ...mapMutations(['getDetail'])
    },
    mounted(){
        
        this.getDetail({id:this.$route.query.id})
       
    }
}
</script>